package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.common.PageInfo;
import com.smart.model.domain.OperatePermissionDO;
import com.smart.model.request.OperatePermissionRequest;
import com.smart.model.vo.OperatePermissionVO;
import com.smart.model.vo.OperateTreePermissionVO;

import java.util.List;

/**
 * @author zhanghong
 */
public interface OperatePermissionService extends IService<OperatePermissionDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     OperatePermissionVO getByKey(long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<OperatePermissionVO> pageQuery(OperatePermissionRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<OperatePermissionVO> listQuery(OperatePermissionRequest request);
    /**
     * 新增
     * @param request
     * @return
     */
    Boolean add(OperatePermissionRequest request);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    Boolean updateByKey(OperatePermissionRequest request);

    /**
     * 查询权限菜单tree
     * @return
     */
    List<OperateTreePermissionVO> listAllPermission();
}
